home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
newu173c.zip
/
R-PCNEWU.MRG
< prev
next >
Wrap
Text File
|
1992-04-07
|
14KB
|
297 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against RBBS-PC.BAS to produce RBBS-PC.NEW
* RBBS-PC.BAS: Date 9-5-1991 Size 159962 bytes
* ------------[ Created 02-29-1992 ]------------
102 ZMsgDim = 99
WasMM = 999
WasBX = 75
WasJ = 60
REDIM ZOptSec(WasJ)
DIM ZWorkAra$(WasJ)
DIM ZGSRAra$(WasJ)
DIM ZCategoryName$(WasBX),ZCategoryCode$(WasBX),ZCategoryDesc$(WasBX)
DIM ZOutTxt$(ZMsgDim) ' Message line table
DIM ZUserIn$(ZMsgDim) ' Message line table
DIM ZMsgPtr(WasMM,2) ' Message pointers
CALL VarInit
ZWelcomeAboard = ZFalse ' RM032401
800 IF ZAdjustedSecurity THEN _ ' KG032501
GOSUB 5135
IF ZOrigCnfg$ = ZCurDef$ THEN _
ZMainUserFileIndex = ZUserFileIndex : _
ZOrigSec = ZUserSecLevel : _
ZUserSecSave = ZUserSecLevel : _
ZOrigUserName$ = ZActiveUserName$
ZTimesLoggedOn = CVI(MID$(ZUserOption$,1,2)) - _
((ZOrigCnfg$ <> ZCurDef$ OR NOT ZSubBoard) AND _ ' KG022601
(NOT ZPrivateDoor) AND (NOT ZExitToDoors))
GOSUB 9500
IF (NOT ZExitToDoors) AND (NOT ZSubBoard) THEN _ ' KG022601
CALL UpdtCalr (ZActiveUserName$ + " from " + ZWasCI$ + _
" Lvl" + STR$(ZUserSecLevel) + " " + TIME$,2) : _ ' RM022301
CALL ExpiredPswd : _ ' RM031401
IF ZANSITest = ZTrue THEN _ ' RM022301
CALL UpdtCalr ("ANSI detected! " + TIME$,2) ' RM022301
PrevLastOn$ = ZLastDateTimeOn$
IF ZLocalUser THEN _
ZTalkToModemAt$ = "9600" : _
ZBaudParity$ = "9600 BPS,N,8,1" : _ ' DA062001
ZModemInitBaud$ = "9600" : _
ZSnoop = ZTrue : _
ZLineFeeds = ZTrue
CALL SetCrLf
CALL SetPrompt
CALL XferType (2,ZTrue)
IF NOT ZSubBoard THEN _ ' KG022601
BoardCheckDate$ = PrevLastOn$
CALL SetSysOp ' KG022601
IF ZWasA THEN _ ' KG060101
ZActiveUserName$ = "SYSOP" : _
ZFirstName$ = "SysOp" ' KG011401
IF ZExitToDoors OR ZSubBoard THEN _ ' KG022601
GOTO 815
GOSUB 465
IF (ZEightBit AND _
ZAutoDownDesired) OR _
ZAskID THEN _
CALL TestUser
CALL QuickTPut1 ("Logging " + ZActiveUserName$)
CALL Talk (1,ZOutTxt$)
Temp$ = STR$(ZBaudTest!) + MID$(ZBaudParity$,INSTR(ZBaudParity$," B")) ' KG081902
CALL QuickTPut1 ("RBBS-PC " + ZVersionID$ + " Node " + ZNodeID$ + _
", Running at" + Temp$) ' TC090101
CALL QuickTPut1 ("The Small Time BBS - Mods by RM") ' RM022592
CALL SkipLine (1)
Attempts = 0
ZWasZ$ = ZActiveUserName$ + _ ' KG052701
" on at " + _ ' KG052701
ZCurDate$ + _ ' KG052701
", " + _ ' KG052701
ZTime$ + _ ' KG052701
" from " + _ ' KG052701
ZWasCI$ + _ ' KG052701
"," + Temp$ ' KG081902
ZWasNG$ = ZWasZ$ + SPACE$(128 - LEN(ZWasZ$)) ' KG090401
'
' * ALWAYS RECORD THE HASH/INDIVIDUATING FIELD TO EACH RECORD LOGGED OUT
'
WasX$ = "{" + _ ' KG052701
HashValue$ + _ ' KG052701
"/" + _ ' KG052701
ZIndivValue$ + _ ' RC050901
"}" ' KG052701
IF LEN(ZWasZ$) < 65 THEN _ ' KG052701
WasX = 65 _ ' KG052701
ELSE WasX = LEN(ZWasZ$) + 2 ' KG052701
MID$(ZWasNG$,WasX) = WasX$ ' KG052701
CALL Printit (" " + ZWasZ$) ' KG052701
IF ZNewUser THEN _ ' KG052701
CALL UpdtCalr ("NEWUSER",1) : _ ' KG052701
CALL FindFile ("WELCOME.DEF",ZWelcomeAboard) : _ ' RM032401
CALL Muzak (2) ' KG052701
900 IF ZWelcomeAboard THEN _ ' RM032401
GOSUB 1800 : _ ' RM032401
CALL UpdtCalr ("New user welcome message sent!",1) : _ ' RM032401
WelcomeAboard = ZWelcomeAboard : _ ' RM032402
ZWelcomeAboard = ZFalse ' RM032401
ZNewUser = ZFalse ' RM032401 Old line number 900
ActionFlag = (ZLogonMailLevel$ = "S")
LogonMailNew = (ZLogonMailLevel$ = "N")
1800 IF ZWelcomeAboard THEN _ ' RM032401
MsgTo$ = ZActiveUserName$ : _ ' RM032401
OrigSubject$ = "Welcome Aboard" : _ ' RM032401
Subject$ = OrigSubject$ : _ ' RM032401
CALL OpenMsg : _ ' RM032401
FIELD 1, 128 AS ZMsgRec$ : _ ' RM032401
ZWasZ$ = ZActiveMsgFile$ : _ ' RM032401
ZMsgHeader$ = "Message" : _ ' RM032401
GOTO 2002 ' RM032401
MsgTo$ = "SYSOP"
OrigSubject$ = "COMMENT"
Subject$ = OrigSubject$
GOSUB 1893
2000 QuotedReply = ZFalse
MsgFrom$ = ZActiveUserName$
SysopMsg = ZFalse
GOSUB 1893
2001 IF (LowMsgNumber > 0 AND ActiveMessages >= MaxMsgs) _ ' KG073102
OR HighMsgNumber >= 9999 THEN _
IF ZActiveMessageFile$ = ZMainMsgFile$ AND _
ActiveMessages = 1 THEN _
GOTO 5300 _
ELSE ZOutTxt$ = "Sorry, the Message Base is Full. Try Again Tomorrow." : _ ' TC090101
GOSUB 12975 : _
GOTO 3650
2002 IF ZWelcomeAboard THEN _ ' RM032401
IF (LowMsgNumber > 0 AND ActiveMessages >= MaxMsgs) _ ' RM032401
OR HighMsgNumber >= 9999 THEN _ ' RM032401
RETURN _ ' RM032401
ELSE _ ' RM032401
GOTO 2020 ' RM032401
2006 IF NOT (ZReply OR MsgFwd) THEN _
MsgPswd$ = ""
ZSysopComment = ZFalse
IF ZReply OR MsgFwd THEN SaveAnsIndex = ZAnsIndex
IF MsgFwd OR NOT ZReply THEN _
IF ZUserSecLevel >= ZOptSec(5) THEN MsgTo$ = ""
2020 CALL MessageTo (HighestUserRecord,MsgTo$,MsgFrom$,RcvrRecNum,Found)
IF ZWelcomeAboard THEN _ ' RM032401
GOTO 2335 ' RM032401
IF MsgTo$ = "" THEN _
RETURN
IF ZSysopComment OR SysopMsg THEN _
GOTO 2100
IF ZReply OR MsgFwd THEN _
Found = ZTrue : _
CALL Trim (MsgTo$): _
GOTO 2035 _
ELSE Subject$ = ""
GOSUB 2065
2035 IF QuotedReply THEN _
RETURN
GOTO 2100
2332 IF ZLinesInMsg < 1 THEN _
ZLinesInMsg = 1
GOTO 2127
2335 WasX = ZLinesInMsg
CALL MsgImport (ZMaxMsgLines,ZRightMargin,ZLinesInMsg,ZOutTxt$())
IF ZWelcomeAboard THEN _ ' RM032401
GOTO 3406 ' RM032401
IF ZLinesInMsg > WasX THEN _
GOTO 3000 _
ELSE GOTO 2300
3405 SaveReplyStatus = ZReply
ZReply = ZTrue
IF SysopMsg THEN _
MsgPswd$ = "^READ^" _
ELSE CALL MsgProt (MsgTo$,Found,MsgPswd$)
3406 IF ZWelcomeAboard THEN _ ' RM032401
SaveReplyStatus = ZReply : _ ' RM032401
ZReply = ZTrue : _ ' RM032401
MsgFrom$ = "SYSOP" : _ ' RM032401
MsgPswd$ = "^READ^" ' RM032401
SysopMsg = ZFalse
ZReply = SaveReplyStatus
GOSUB 4910
MsgRecSave$ = ZMsgRec$
MsgCorrected = ZFalse
GOSUB 23100
IF ZWelcomeAboard THEN _ ' RM032401
GOTO 3407 ' RM032401
ZOutTxt$ = "Adding new msg #" + _
STR$(HighMsgNumber + 1)
IF NOT ZLocalUser THEN _
CALL UpdtCalr (ZOutTxt$,1)
GOSUB 12978
3407 ZWasSL = 0 ' RM032401
ZWasN$ = ""
ZLastIndex = 0
HighMsgNumber = HighMsgNumber + 1
3410 ActiveMessages = ActiveMessages + 1
MsgNum$ = STR$(HighMsgNumber) + _
SPACE$(5 - LEN(STR$(HighMsgNumber)))
IF MsgPswd$ = "^READ^" THEN _
MID$(MsgNum$,1,1) = "*" : _
SecForMsg = ZPrivateReadSec _
ELSE SecForMsg = ZPublicReadSec
3460 IF ZWelcomeAboard THEN _ ' RM032401
MsgFrom$ = LEFT$(MsgFrom$ + SPACE$(31),31) : _ ' RM032401
GOTO 3461 ' RM032401
IF NOT MsgFwd THEN _ ' RM032401 Old line number 3460
MsgFrom$ = LEFT$(ZActiveUserName$ + SPACE$(31),31) _
ELSE _
MsgFrom$ = LEFT$(MsgFrom$ + SPACE$(31),31)
3461 MsgTo$ = LEFT$(MsgTo$ + SPACE$(31),31) ' RM032401
MID$(MsgTo$,23,8) = TIME$
Subject$ = LEFT$(OrigSubject$ + SPACE$(25),25)
MsgPswd$ = LEFT$(MsgPswd$ + SPACE$(15),15)
IF QuotedReply AND _
ZLinesInMsg > ZMaxMsgLines THEN _
ZLinesInMsg = ZMaxMsgLines
FOR WasJ = 1 TO ZLinesInMsg
ZOutTxt$(WasJ) = ZOutTxt$(WasJ) + _
CHR$(227)
ZWasSL = ZWasSL + LEN(ZOutTxt$(WasJ))
NEXT
IF ZWasSL MOD 128 = 0 THEN _
ZWasN$ = STR$(ZWasSL \ 128 + 1) _
ELSE ZWasN$ = STR$(ZWasSL \ 128 + 2)
3530 Temp = ZNextMsgRec
ZNextMsgRec = Temp + VAL(ZWasN$)
LSET ZMsgRec$ = MsgRecSave$
GOSUB 24000
GET 1,Temp
ZMsgPtr(ActiveMessages,1) = Temp
ZMsgPtr(ActiveMessages,2) = HighMsgNumber
LSET ZMsgRec$ = MsgNum$ + _
MsgFrom$ + _
MsgTo$ + _
ZCurDate$ + _
Subject$ + _
MsgPswd$ + _
ZActiveMessage$ + _
ZWasN$ + _
SPACE$(4 - LEN(ZWasN$)) + _
MKI$(SecForMsg)
PUT 1,Temp
ZWasN$ = ""
NumDots = 0
FOR WasJ = 1 TO ZLinesInMsg
IF NOT ZWelcomeAboard THEN _ ' RM032401
CALL MarkTime (NumDots)
ZWasN$ = ZWasN$ + _
ZOutTxt$(WasJ)
IF LEN(ZWasN$) > 127 THEN _
LSET ZMsgRec$ = ZWasN$ : _
PUT 1 : _
ZWasN$ = MID$(ZWasN$,129)
3630 NEXT
IF LEN(ZWasN$) > 0 THEN _
LSET ZMsgRec$ = ZWasN$ : _
PUT 1
REDIM ZOutTxt$(ZMsgDim)
IF MsgCorrected THEN _
MsgCorrected = ZFalse : _
ActionFlag = ZTrue : _
CALL SkipLine (1) : _
GOSUB 1900
3640 CALL SkipLine (1)
GET 1,1
GOSUB 12985
' ---[ notify receiver that has new mail waiting ]---
IF RcvrRecNum > 0 THEN _
UserFileIndexSave = ZUserFileIndex : _
UserRecordHold$ = ZUserRecord$ : _
ZUserFileIndex = RcvrRecNum : _
GOSUB 12989 : _
GET 5, RcvrRecNum : _
WasX = CVI(MID$(ZUserRecord$,57,2)) : _
MID$(ZUserRecord$,57,2) = MKI$(WasX OR 512) : _
PUT 5, RcvrRecNum : _
GOSUB 12991 : _
ZUserFileIndex = UserFileIndexSave : _
LSET ZUserRecord$ = UserRecordHold$ : _
IF NOT ZWelcomeAboard THEN _ ' RM032401
CALL QuickTPut ("New Mail Indicator Updated.",1) : _ ' TC090101
RcvrRecNum = 0
CALL SkipLine (1) ' TC090101
3650 QuotedReply = ZFalse
MsgLockLines = 0
IF ZWelcomeAboard THEN _ ' RM032401
RETURN ' RM032401
IF ZReply OR MsgFwd THEN _
ZReply = ZFalse : _
ZAnsIndex = SaveAnsIndex : _
GOTO 5344
IF ZGetExtDesc THEN _
ZLinesInMsg = 0 : _
RETURN